refactor(triton): simplify JIT backend architecture - #925
Draft
voltjia wants to merge 6 commits into
Draft
Conversation
voltjia
force-pushed
the
refactor/triton-jit-architecture
branch
from
August 12, 2026 11:14
de9694a to
bd9f92d
Compare
voltjia
force-pushed
the
stack/pr-800-triton-backend-jit
branch
from
August 12, 2026 22:22
0c73a9e to
1c9ec2c
Compare
voltjia
force-pushed
the
refactor/triton-jit-architecture
branch
from
August 12, 2026 22:23
bd9f92d to
439472d
Compare
voltjia
force-pushed
the
stack/pr-800-triton-backend-jit
branch
from
August 13, 2026 05:54
1c9ec2c to
e9d98ec
Compare
voltjia
force-pushed
the
refactor/triton-jit-architecture
branch
2 times, most recently
from
August 13, 2026 06:14
1a0197a to
3f8f072
Compare
voltjia
force-pushed
the
refactor/triton-jit-architecture
branch
from
August 13, 2026 06:29
3f8f072 to
1a6b83c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
infini::ops::triton::jitand use concise names such asTarget,DataType,Backend,ScopedDevice, andKernel.backend.h, with an inline NVIDIABackendspecialization; remove the separate NVIDIA declaration/instantiation files.Targetwith Triton'sGPUTargetsemantics (backend,architecture, andwarp_size) and pass the runtime device ID separately.KernelMetadataas the local projection needed to load and launch a compiled Triton kernel: name, actualnum_warps, shared memory, and unsupported scratch sizes. Keep the binary extension in the artifact envelope rather than kernel metadata.Py_IsInitialized(), which safely guards GIL acquisition when no interpreter exists.IdentityBuilder, and use value/optionalreturns instead of bool-plus-output-pointer APIs.jit.py, keeppyproject.tomlunchanged, and retainconfig_.ccas the key-function/vtable anchor for polymorphic configs across the core and pybind DSOs.Motivation
This is a stacked cleanup of #800 focused on architecture, naming, modularity,
readability, and maintainability while preserving the template boundary needed
for future Triton backends.
Both stacked branches are rebased onto
masterat7f4201e19eddf8c5eaf5cdbdde6ba8ae8329040a. This PR contains one architecturecommit on top of
stack/pr-800-triton-backend-jit; the already merged #919 and#924 changes are inherited from
master.Related: #800, #919
Type of Change
refactor- code restructuring without an intended public behavior changePlatforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Focused validation for current commit
1a0197a5920351ca7ae6b24a789f983ff438f18aafter the final rebase:The predecessor architecture was built and exercised on NVIDIA, including
configured Add, auto-tuning, and multi-device smoke. The backend and bridge have
changed since that run, so a full build and GPU smoke will be rerun on the final
SHA before merge rather than attributed to this commit.
Test Results on Supported Platforms
Benchmark / Performance Impact
N/A. This PR does not make a performance claim.
Notes for Reviewers
addoperator #800 comes from a fork, so GitHub cannot use its head directly as an upstream PR base.stack/pr-800-triton-backend-jitmirrors its three commits and is now rebased onto currentmaster; the source PR feat(triton): add JIT backend withaddoperator #800 still points to its fork head.GPUTargetcontains backend, architecture, and warp size. Runtime device selection therefore stays outsideTarget.binary_extremains an artifact-format property rather than aKernelMetadatafield.Makeso derived config identity is not erased by the generic operator cache. Compiled kernels and auto-tuning results remain cached by their complete identities. Configless calls continue throughCall.Backend<kDev>specialization backed by the corresponding InfiniRT Runtime/Driver capabilities. Unsupported devices remain invisible to operator implementation discovery through the incomplete primary template.